A Don’t Sit on the Fence: A Static Analysis Approach to Automatic Fence Insertion

نویسندگان

  • JADE ALGLAVE
  • DANIEL KROENING
  • VINCENT NIMAL
  • DANIEL POETZL
چکیده

events. An abstract event represents all events with same program point, direction (write or read), and compatible memory location. An abstract event consists of first a unique identifier, then the direction specifier (W or R), and then the address specifier. In Figure 10(a), (a)Wx abstracts the events (a′)Wx1 and (a′′)Wx2 in the executions of Figure 10(b) and (c). Moreover, for example, a static event (a)W∗ would also abstract the two events, as ∗ is compatible with any memory location. We write addr(e) for the address specifier of an abstract event e. Static program order. The static program order relation pos abstracts all the (dynamic) po edges that connect two events in program order and that cannot be decomposed as a succession of po edges in this execution. We write pos (resp. pos) for the transitive (resp. reflexive-transitive) closure of this relation. We also write begin(pos) and end(pos) to denote respectively the sets of the first and last abstract events of pos. That is, if we imagine the pos relation as a directed graph, then begin(pos) contains the abstract events in pos that do not have incoming edges, and end(pos) contains the abstract events that do not have outgoing edges. Competing pairs. The external communications coe ∪ rfe ∪ fre are over-approximated by the competing pairs relation cmp. In Figure 10(a), the cmp edges (a, f), (b1, d), and (c, f) abstract in particular the fre edges (f ′, c′) and (f ′, a′), and the rfe edge (b1, d′) in Figure 10(b). We do not need to represent internal communications as they are already covered by pos . The cmp construction is similar to the first steps of static data race detection (see, e.g., [Kahlon et al. 2009, Sec. 5]), where statements involved in write-read or write-write communications are collected. As further work, we could reduce the set of competing 3We denote the function composition operator by ◦. ACM Transactions on Programming Languages and Systems, Vol. V, No. N, Article A, Publication date: January YYYY. Don’t Sit on the Fence: A Static Analysis Approach to Automatic Fence Insertion A:15 (1) assignment: lhs = rhs; i τ [lhs = rhs; i](aeg) = let Es = aeg.Es ∪ evts(lhs) ∪ evts(rhs)∪ trg(lhs) in let pos = aeg.pos∪ end(aeg.pos)× (evts(rhs) ∪ evts(lhs))∪ (evts(rhs) ∪ evts(lhs))× trg(lhs) in τ [i](Es,pos, aeg. cmp) R W τ [i] evts(lhs) ∪ evts(rhs) trg(lhs) pos pos pos (2) function call3: fun(); i τ [fun(); i] = τ [i] ◦ τ [body(fun)] τ [body(f)] τ [i] pos pos (3) guard: [guard] i1; i2 τ [ [guard] i1; i2](aeg) = let guarded = τ [i1](aeg) in let Es = aeg.Es ∪ guarded.Es in let pos = aeg.pos ∪ guarded.pos in τ [i2](Es,pos, aeg. cmp) τ [i1] τ [i2] pos pos

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A numerical study on the flow through a plane symmetric sudden expansion with a fence viewed as a diffuser

The numerical analysis and performance simulation of a sudden expansion with fence viewed as a diffuser are presented in this paper. SIMPLE algorithm is used to solve two-dimensional steady differential equations for conservation of mass and momentum. The Reynolds number is in the range of 20 to 100 and fence subtended angle (FSA) between 10 ̊ to 30 ̊. The location of fence from throat varies fro...

متن کامل

Numerical Solution of Fence Performance for Reduction of Sand Deposition on Railway Tracks

Movement of sand particles in nature creates many problems for humans. One of these problems is deposition of particles on rails that decrease the speed of the train or in some cases hampers the reversal of the train rails. In this paper the motion of sand particles over a railway track embankment, and how these particles settle on railway tracks are investigated. Moreover,the performance of di...

متن کامل

Memorax, a Precise and Sound Tool for Automatic Fence Insertion under TSO

We introduce MEMORAX, a tool for the verification of control state reachability (i.e., safety properties) of concurrent programs manipulating finite range and integer variables and running on top of weak memory models. The verification task is non-trivial as it involves exploring state spaces of arbitrary or even infinite sizes. Even for programs that only manipulate finite range variables, the...

متن کامل

Study on Pressure Characteristics of Fluid Passing through a Sudden Expansion with Central Restriction and Fence

In this paper, a numerical study on pressure characteristics of fluid passing through a configuration of sudden expansion with central restriction only and sudden expansion with central restriction and fence has been carried out. The two dimensional steady differential equations for conservation of mass and momentum are solved for Reynolds number ranging from 50 to 200, percentage of central re...

متن کامل

Precise and Sound Automatic Fence Insertion Procedure under PSO

We give a sound and complete procedure for fence insertion for concurrent finite-state programs running under the PSO memory model. This model allows “write to read” and “write-to-write” relaxations corresponding to the addition of an unbounded store buffers between processors and the main memory. We introduce a novel machine model, called the Hierarchical Single-Buffer (HSB) semantics, and sho...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016